<template>
	<view>
		<cu-custom bgColor="bg-gradual-blue" :isBack="true">
			<block slot="backText">返回</block>
			<block slot="content">{{title}}</block>
		</cu-custom>
		<view class="cu-chat">
			<view class="cu-item self">
				<view class="main">
					<view class="content bg-green shadow">
						<text>喵喵喵！喵喵喵！喵喵喵！喵喵！喵喵！！喵！喵喵喵！</text>
					</view>
				</view>
				<view class="cu-avatar radius" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big107000.jpg);"></view>
				<view class="date">2018年3月23日 13:23</view>
			</view>
			<view class="cu-item">
				<view class="cu-avatar radius" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big143004.jpg);"></view>
				<view class="main">
					<view class="content shadow">
						<text>喵喵喵！喵喵喵！按时打算大所啊实打实的撒地方撒大高速萨达撒地方撒地方撒打算水电费水电费史蒂夫</text>
					</view>
				</view>
				<view class="date"> 13:23</view>
			</view>
			<view class="cu-item self">
				<view class="main">
					<image src="https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg" class="radius" mode="widthFix"></image>
				</view>
				<view class="cu-avatar radius" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big107000.jpg);"></view>
				<view class="date"> 13:23</view>
			</view>
			<view class="cu-item self">
				<view class="main">
					<view class="content bg-green shadow">
						<text>喵喵喵！喵喵喵！喵喵喵！喵喵！喵喵！！喵！喵喵喵！</text>
					</view>
				</view>
				<view class="cu-avatar radius" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big107000.jpg);"></view>
				<view class="date">2018年3月23日 13:23</view>
			</view>
			<view class="cu-item">
				<view class="cu-avatar radius" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big143004.jpg);"></view>
				<view class="main">
					<view class="content shadow">
						<text>喵喵喵！喵喵喵！按时打算大所啊实打实的撒地方撒大高速萨达撒地方撒地方撒打算水电费水电费史蒂夫</text>
					</view>
				</view>
				<view class="date"> 13:23</view>
			</view>
			<view class="cu-item self">
				<view class="main">
					<image src="https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg" class="radius" mode="widthFix"></image>
				</view>
				<view class="cu-avatar radius" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big107000.jpg);"></view>
				<view class="date"> 13:23</view>
			</view>
			<view class="cu-item self">
				<view class="main">
					<view class="content bg-green shadow">
						<text>喵喵喵！喵喵喵！喵喵喵！喵喵！喵喵！！喵！喵喵喵！</text>
					</view>
				</view>
				<view class="cu-avatar radius" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big107000.jpg);"></view>
				<view class="date">2018年3月23日 13:23</view>
			</view>
			<view class="cu-item">
				<view class="cu-avatar radius" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big143004.jpg);"></view>
				<view class="main">
					<view class="content shadow">
						<text>喵喵喵！喵喵喵！按时打算大所啊实打实的撒地方撒大高速萨达撒地方撒地方撒打算水电费水电费史蒂夫</text>
					</view>
				</view>
				<view class="date"> 13:23</view>
			</view>
			<view class="cu-item self">
				<view class="main">
					<image src="https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg" class="radius" mode="widthFix"></image>
				</view>
				<view class="cu-avatar radius" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big107000.jpg);"></view>
				<view class="date"> 13:23</view>
			</view>
		</view>
		<view class="cu-bar foot input" :style="[{bottom:InputBottom+'px'}]">
			<view class="action">
				<uni-icons class="icon" type="image" color="007aff" size="20" />
			</view>
			<input class="solid-bottom" :adjust-position="false" :focus="false" maxlength="300" cursor-spacing="10" @focus="InputFocus"
			 @blur="InputBlur"></input>
			<button class="cu-btn bg-green shadow">发送</button>
		</view>
	</view>
</template>

<script>
	export default {
		onLoad(o) {

		},
		data() {
			return {
				title: '朱文贤',
				InputBottom: 0
			}
		},
		methods: {
			InputFocus(e) {
				this.InputBottom = e.detail.height
			},
			InputBlur(e) {
				this.InputBottom = 0
			}
		}
	}
</script>

<style>
	page{
	  padding-bottom: 50px;
	}
	.icon {
		/* margin-left: 10px; */
		color: #007aff;
		height: 36px;
		width: 36px;
	}
	.icon:active {
		color: #8F8F94
	}

	.radius {
		border-radius: 3px;
	}

	/* ==================
         聊天
 ==================== */

	.cu-chat {
		display: flex;
		flex-direction: column;
	}

	.cu-chat .cu-item {
		display: flex;
		padding: 15px 15px 35px;
		position: relative;
	}

	.cu-chat .cu-item>.cu-avatar {
		width: 40px;
		height: 40px;
	}

	.cu-chat .cu-item>.main {
		max-width: calc(100% - 130px);
		margin: 0 20px;
		display: flex;
		align-items: center;
	}

	.cu-chat .cu-item>image {
		height: 160px;
	}

	.cu-chat .cu-item>.main .content {
		padding: 10px;
		border-radius: 3px;
		display: inline-flex;
		max-width: 100%;
		align-items: center;
		font-size: 15px;
		position: relative;
		/* min-height: 40px; */
		line-height: 20px;
		text-align: left;
	}

	.cu-chat .cu-item>.main .content:not([class*="bg-"]) {
		background-color: #ffffff;
		color: #333333;
	}

	.cu-chat .cu-item .date {
		position: absolute;
		font-size: 12px;
		color: #8799a3;
		width: calc(100% - 160px);
		bottom: 10px;
		left: 80px;
	}

	.cu-chat .cu-item .action {
		padding: 0 15px;
		display: flex;
		align-items: center;
	}

	.cu-chat .cu-item>.main .content::after {
		content: "";
		top: 14px;
		transform: rotate(45deg);
		position: absolute;
		z-index: 100;
		display: inline-block;
		overflow: hidden;
		width: 12px;
		height: 12px;
		left: -6px;
		right: initial;
		background-color: inherit;
	}

	.cu-chat .cu-item.self>.main .content::after {
		left: auto;
		right: -6px;
	}

	.cu-chat .cu-item>.main .content::before {
		content: "";
		top: 15px;
		transform: rotate(45deg);
		position: absolute;
		z-index: -1;
		display: inline-block;
		overflow: hidden;
		width: 12px;
		height: 12px;
		left: -6px;
		right: initial;
		background-color: inherit;
		filter: blur(3px);
		opacity: 0.3;
	}

	.cu-chat .cu-item>.main .content:not([class*="bg-"])::before {
		background-color: #333333;
		opacity: 0.1;
	}

	.cu-chat .cu-item.self>.main .content::before {
		left: auto;
		right: -6px;
	}

	.cu-chat .cu-item.self {
		justify-content: flex-end;
		text-align: right;
	}

	.cu-chat .cu-info {
		display: inline-block;
		margin: 10px auto;
		font-size: 12px;
		padding: 4px 6px;
		background-color: rgba(0, 0, 0, 0.2);
		border-radius: 3px;
		color: #ffffff;
		max-width: 200px;
		line-height: 1.4;
	}
	
	/* ==================
	          头像
	 ==================== */
	
	.cu-avatar {
		font-variant: small-caps;
		margin: 0;
		padding: 0;
		display: inline-flex;
		text-align: center;
		justify-content: center;
		align-items: center;
		background-color: #ccc;
		color: #ffffff;
		white-space: nowrap;
		position: relative;
		width: 32px;
		height: 32px;
		background-size: cover;
		background-position: center;
		vertical-align: middle;
		font-size: 1.5em;
	}
	
	.cu-avatar.sm {
		width: 24px;
		height: 24px;
		font-size: 1em;
	}
	
	.cu-avatar.lg {
		width: 48upx;
		height: 48upx;
		font-size: 2em;
	}
	
	.cu-avatar.xl {
		width: 64px;
		height: 64px;
		font-size: 2.5em;
	}
	
	.cu-avatar .avatar-text {
		font-size: 0.4em;
	}
	
	.cu-avatar-group {
		direction: rtl;
		unicode-bidi: bidi-override;
		padding: 0 5px 0 20px;
		display: inline-block;
	}
	
	.cu-avatar-group .cu-avatar {
		margin-left: -15px;
		border: 2px solid #f1f1f1;
		vertical-align: middle;
	}
	
	.cu-avatar-group .cu-avatar.sm {
		margin-left: -10px;
		border: 1upx solid #f1f1f1;
	}
	
	/* ==================
	          按钮
	 ==================== */

	.cu-btn {
		position: relative;
		border: 0px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		box-sizing: border-box;
		padding: 0 15px;
		font-size: 14px;
		height: 32px;
		line-height: 1;
		text-align: center;
		text-decoration: none;
		overflow: visible;
		margin-left: initial;
		transform: translate(0px, 0px);
		margin-right: initial;
	}

	.cu-btn::after {
		background-color: #fef0f0;
		display: none;
	}

	.cu-btn:not([class*="bg-"]) {
		background-color: #f0f0f0;
	}
	
	.cu-btn[class*="line"] {
		background-color: transparent;
	}
	
	.cu-btn[class*="line"]::after {
		content: " ";
		display: block;
		width: 200%;
		height: 200%;
		position: absolute;
		top: 0;
		left: 0;
		border: 1upx solid currentColor;
		transform: scale(0.5);
		transform-origin: 0 0;
		box-sizing: border-box;
		border-radius: 12upx;
		z-index: 1;
		pointer-events: none;
	}
	
	.cu-btn.round[class*="line"]::after {
		border-radius: 1000upx;
	}
	
	.cu-btn[class*="lines"]::after {
		border: 6upx solid currentColor;
	}
	
	.cu-btn[class*="bg-"]::after {
		display: none;
	}
	
	.cu-btn.sm {
		padding: 0 20upx;
		font-size: 20upx;
		height: 48upx;
	}
	
	.cu-btn.lg {
		padding: 0 40upx;
		font-size: 32upx;
		height: 80upx;
	}
	
	.cu-btn.cuIcon.sm {
		width: 48upx;
		height: 48upx;
	}
	
	.cu-btn.cuIcon {
		width: 64upx;
		height: 64upx;
		border-radius: 500upx;
		padding: 0;
	}
	
	.solid-bottom {
		padding: 5px 0px;
		border-color: #e5e5e5;
		border-bottom-width: 1px;
		border-bottom-style: solid;
	}

	.bg-green {
		background-color: #39b54a;
		color: #ffffff;
	}

	/* -- 阴影 -- */
	.shadow[class*='white'] {
		--ShadowSize: 0 0.5px 3px;
	}
	.shadow-lg {
		--ShadowSize: 0upx 20px 50px 0upx;
	}
	
	.shadow-warp {
		position: relative;
		box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
	}
	
	.shadow-warp:before,
	.shadow-warp:after {
		position: absolute;
		content: "";
		top: 10px;
		bottom: 15px;
		left: 10px;
		width: 50%;
		box-shadow: 0 15px 10px rgba(0, 0, 0, 0.2);
		transform: rotate(-3deg);
		z-index: -1;
	}
	
	.shadow-warp:after {
		right: 10px;
		left: auto;
		transform: rotate(3deg);
	}
	
	.shadow-blur {
		position: relative;
	}
	
	.shadow-blur::before {
		content: "";
		display: block;
		background: inherit;
		filter: blur(5px);
		position: absolute;
		width: 100%;
		height: 100%;
		top: 5px;
		left: 5px;
		z-index: -1;
		opacity: 0.4;
		transform-origin: 0 0;
		border-radius: inherit;
		transform: scale(1, 1);
	}

	/* ==================
	          操作条
	 ==================== */

	.cu-bar {
		display: flex;
		position: relative;
		align-items: center;
		min-height: 50px;
		justify-content: space-between;
	}

	.cu-bar .action {
		display: flex;
		align-items: center;
		height: 100%;
		justify-content: center;
		max-width: 100%;
	}

	.cu-bar .action.border-title {
		position: relative;
		top: -50px;
	}

	.cu-bar .action.border-title text[class*="bg-"]:last-child {
		position: absolute;
		bottom: -0.5rem;
		min-width: 2rem;
		height: 3px;
		left: 0;
	}

	.cu-bar .action.sub-title {
		position: relative;
		top: -0.2rem;
	}

	.cu-bar .action.sub-title text {
		position: relative;
		z-index: 1;
	}

	.cu-bar .action.sub-title text[class*="bg-"]:last-child {
		position: absolute;
		display: inline-block;
		bottom: -0.2rem;
		border-radius: 3px;
		width: 100%;
		height: 0.6rem;
		left: 0.6rem;
		opacity: 0.3;
		z-index: 0;
	}

	.cu-bar .action.sub-title text[class*="text-"]:last-child {
		position: absolute;
		display: inline-block;
		bottom: -0.7rem;
		left: 0.5rem;
		opacity: 0.2;
		z-index: 0;
		text-align: right;
		font-weight: 900;
		font-size: 18px;
	}

	.cu-bar.justify-center .action.border-title text:last-child,
	.cu-bar.justify-center .action.sub-title text:last-child {
		left: 0;
		right: 0;
		margin: auto;
		text-align: center;
	}

	.cu-bar .action:first-child {
		margin-left: 15px;
		font-size: 15px;
	}

	.cu-bar .action text.text-cut {
		text-align: left;
		width: 100%;
	}

	.cu-bar .cu-avatar:first-child {
		margin-left: 10px;
	}

	.cu-bar .action:first-child>text[class*="cuIcon-"] {
		margin-left: -0.3em;
		margin-right: 0.3em;
	}

	.cu-bar .action:last-child {
		margin-right: 15px;
	}

	.cu-bar .action>text[class*="cuIcon-"],
	.cu-bar .action>view[class*="cuIcon-"] {
		font-size: 18px;
	}

	.cu-bar .action>text[class*="cuIcon-"]+text[class*="cuIcon-"] {
		margin-left: 0.5em;
	}

	.cu-bar .content {
		position: absolute;
		text-align: center;
		width: calc(100% - 170px);
		left: 0;
		right: 0;
		bottom: 0;
		top: 0;
		margin: auto;
		height: 30px;
		font-size: 16px;
		line-height: 30px;
		cursor: none;
		pointer-events: none;
		text-overflow: ellipsis;
		white-space: nowrap;
		overflow: hidden;
	}

	.cu-bar.ios .content {
		bottom: 3.5px;
		height: 30px;
		font-size: 16px;
		line-height: 30px;
	}

	.cu-bar.btn-group {
		justify-content: space-around;
	}

	.cu-bar.btn-group button {
		padding: 10px 16px;
	}

	.cu-bar.btn-group button {
		flex: 1;
		margin: 0 10px;
		max-width: 50%;
	}

	.cu-bar .search-form {
		background-color: #f5f5f5;
		line-height: 32px;
		height: 32px;
		font-size: 12px;
		color: #333333;
		flex: 1;
		display: flex;
		align-items: center;
		margin: 0 15px;
	}

	.cu-bar .search-form+.action {
		margin-right: 15px;
	}

	.cu-bar .search-form input {
		flex: 1;
		padding-right: 15px;
		height: 32px;
		line-height: 32px;
		font-size: 13px;
		background-color: transparent;
	}

	.cu-bar .search-form [class*="cuIcon-"] {
		margin: 0 0.5em 0 0.8em;
	}

	.cu-bar .search-form [class*="cuIcon-"]::before {
		top: 0px;
	}

	.cu-bar.fixed,
	.nav.fixed {
		position: fixed;
		width: 100%;
		top: 0;
		z-index: 1024;
		box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
	}

	.cu-bar.foot {
		position: fixed;
		width: 100%;
		bottom: 0;
		z-index: 1024;
		box-shadow: 0 -0.5px 3px rgba(0, 0, 0, 0.1);
	}

	.cu-bar.tabbar {
		padding: 0;
		height: calc(50px + env(safe-area-inset-bottom) / 2);
		padding-bottom: calc(env(safe-area-inset-bottom) / 2);
	}

	.cu-tabbar-height {
		min-height: 50px;
		height: calc(50px + env(safe-area-inset-bottom) / 2);
	}

	.cu-bar.tabbar.shadow {
		box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.1);
	}

	.cu-bar.tabbar .action {
		font-size: 11px;
		position: relative;
		flex: 1;
		text-align: center;
		padding: 0;
		display: block;
		height: auto;
		line-height: 1;
		margin: 0;
		background-color: inherit;
		overflow: initial;
	}

	.cu-bar.tabbar.shop .action {
		width: 70px;
		flex: initial;
	}

	.cu-bar.tabbar .action.add-action {
		position: relative;
		z-index: 2;
		padding-top: 25px;
	}

	.cu-bar.tabbar .action.add-action [class*="cuIcon-"] {
		position: absolute;
		width: 35px;
		z-index: 2;
		height: 35px;
		border-radius: 50%;
		line-height: 35px;
		font-size: 25px;
		top: -32.5px;
		left: 0;
		right: 0;
		margin: auto;
		padding: 0;
	}

	.cu-bar.tabbar .action.add-action::after {
		content: "";
		position: absolute;
		width: 50px;
		height: 50px;
		top: -25px;
		left: 0;
		right: 0;
		margin: auto;
		box-shadow: 0 -1.5px 4px rgba(0, 0, 0, 0.08);
		border-radius: 25px;
		background-color: inherit;
		z-index: 0;
	}

	.cu-bar.tabbar .action.add-action::before {
		content: "";
		position: absolute;
		width: 50px;
		height: 15px;
		bottom: 15px;
		left: 0;
		right: 0;
		margin: auto;
		background-color: inherit;
		z-index: 1;
	}

	.cu-bar.tabbar .btn-group {
		flex: 1;
		display: flex;
		justify-content: space-around;
		align-items: center;
		padding: 0 5px;
	}

	.cu-bar.tabbar button.action::after {
		border: 0;
	}

	.cu-bar.tabbar .action [class*="cuIcon-"] {
		width: 50px;
		position: relative;
		display: block;
		height: auto;
		margin: 0 auto 5px;
		text-align: center;
		font-size: 20px;
	}

	.cu-bar.tabbar .action .cuIcon-cu-image {
		margin: 0 auto;
	}

	.cu-bar.tabbar .action .cuIcon-cu-image image {
		width: 25px;
		height: 25px;
		display: inline-block;
	}

	.cu-bar.tabbar .submit {
		align-items: center;
		display: flex;
		justify-content: center;
		text-align: center;
		position: relative;
		flex: 2;
		align-self: stretch;
	}

	.cu-bar.tabbar .submit:last-child {
		flex: 2.6;
	}

	.cu-bar.tabbar .submit+.submit {
		flex: 2;
	}

	.cu-bar.tabbar.border .action::before {
		content: " ";
		width: 200%;
		height: 200%;
		position: absolute;
		top: 0;
		left: 0;
		transform: scale(0.5);
		transform-origin: 0 0;
		border-right: 1px solid rgba(0, 0, 0, 0.1);
		z-index: 3;
	}

	.cu-bar.tabbar.border .action:last-child:before {
		display: none;
	}

	.cu-bar.input {
		padding-right: 10px;
		background-color: #ffffff;
	}

	.cu-bar.input input {
		overflow: initial;
		line-height: 32upx;
		height: 32upx;
		min-height: 32upx;
		flex: 1;
		font-size: 15px;
		margin: 0 10px;
	}

	.cu-bar.input .action {
		margin-left: 10px;
	}

	.cu-bar.input .action [class*="cuIcon-"] {
		font-size: 24px;
	}

	.cu-bar.input input+.action {
		margin-right: 10px;
		margin-left: 0px;
	}

	.cu-bar.input .action:first-child [class*="cuIcon-"] {
		margin-left: 0ux;
	}

</style>
